/** 
 * 
 * Licensed under the MIT License and Apache License version 2.0
 * 
 * Copyright (c) 2011 Jazz Digital (http://www.jazz.etc.br) 
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 * 
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * http://code.google.com/p/kinect-jazztures/
 * 
 * @author Valério Oliveira (valck) - http://www.valck.in
 * @author João Marquesini - http://www.markezine.me
 * @author Gabriel Tavares de Souza - http://www.gtsouza.com
 * 
 */
package jazztures.objects{
	import jazztures.geom.Point3D;

	/**
	 * 
	 * 
	 */
	public class User extends Object{
		private var _id : uint;
		private var _position : Point3D;
		private var _skeleton : Skeleton;

		/**
		 * 
		 * @param p_id The id (<code>uint</code>) received from the server.
		 * 
		 */
		public function User(p_id:uint){
			_id = p_id;
			_position = new Point3D();
			
			super();
		}
		
		/**
		 * 
		 * Indicates the id of the <code>User</code>.
		 * 
		 * @return <code>uint</code> 
		 * 
		 */
		public function get id():uint{
			return _id;
		}
		
		/**
		 * 
		 * Indicates the id of the <code>User</code>.
		 * 
		 * @param p_value The id (<code>uint</code>).
		 * 
		 */
		public function set id(p_value:uint):void{
			_id = p_value;
		}
		
		
		/**
		 * 
		 * Returns the <code>Skeleton</code> previously added.
		 * 
		 * @return <code>Skeleton</code>
		 * 
		 */
		public function get skeleton():Skeleton{
			return _skeleton;
		}
		
		/**
		 * 
		 * Add a wrapper of <code>Skeleton</code> class into user.
		 * 
		 * @param p_value The <code>Skeleton</code> class.
		 * 
		 */
		public function set skeleton(p_value:Skeleton):void{
			_skeleton = p_value;
		}
		
		/**
		 * 
		 * Indicates the x axis coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get x():Number{
			return _position.x;
		}
		
		/**
		 * 
		 * Indicates the x axis coordinate of the user.  
		 * 
		 * @param p_value The <code>Number</code> to set.
		 * 
		 */
		public function set x(p_value:Number):void{
			_position.x = p_value;
		}
		
		/**
		 * 
		 * Indicates the y axis coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get y():Number{
			return _position.y;
		}
		
		/**
		 * 
		 * Indicates the y axis coordinate of the user.
		 * 
		 * @param p_value The <code>Number</code> to set. 
		 * 
		 */
		public function set y(p_value:Number):void{
			_position.y = p_value;
		}
		
		/**
		 * 
		 * Indicates the z axis coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get z():Number{
			return _position.z;
		}
		
		/**
		 * 
		 * Indicates the z axis coordinate of the user.
		 * 
		 * @param p_value The <code>Number</code> to set. 
		 * 
		 */
		public function set z(p_value:Number):void{
			_position.z = p_value;
		}

		/**
		 * 
		 * Indicates the x rotation coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get rotationX():Number{
			return _position.rotationX;
		}
		
		/**
		 * 
		 * Indicates the x rotation coordinate of the user.
		 * 
		 * @param p_value The <code>Number</code> to set. 
		 * 
		 */
		public function set rotationX(p_value:Number):void{
			_position.rotationX = p_value;
		}
		
		/**
		 * 
		 * Indicates the y rotation coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get rotationY():Number{
			return _position.rotationY;
		}
		
		/**
		 * 
		 * Indicates the y rotation coordinate of the user.
		 * 
		 * @param p_value The <code>Number</code> to set. 
		 * 
		 */
		public function set rotationY(p_value:Number):void{
			_position.rotationY = p_value;
		}
		
		/**
		 * 
		 * Indicates the z rotation coordinate of the user.
		 * 
		 * @return <code>Number</code> 
		 * 
		 */
		public function get rotationZ():Number{
			return _position.rotationZ;
		}
		
		/**
		 * 
		 * Indicates the z rotation coordinate of the user.
		 * 
		 * @param p_value The <code>Number</code> to set. 
		 * 
		 */
		public function set rotationZ(p_value:Number):void{
			_position.rotationZ = p_value;
		}
	}
}